The planning phase of most projects no matter the size result in some kind of documentation or manuals for coding. It could be a rough sketch of the data flow, a UML diagram, feature specifications etc. Some big enterprise projects probably also have a detailed explanation of the individual classes, so that the developers knows exactly what the class has to do and why.

Then again, most projects do not undergo such an elaborate planning phase for various reasons. It might be a one-man hobby application or a simple little website. We all do them from time to time so here is a little trick for adding a planning phase while coding.

Create a new class

Because you haven’t done any real planning, you go ahead and creates a new class with a vague idea about what it has to do and why it has to do it. Instead of just adding properties and methods right away, you can force yourself to think about it and thereby do a little planning. That will help you to keep the class more focused and refactored as you write it and you might find that you need another class instead of just the one.

Comment it

With only the class declaration written in your editor, try to comment the class as thorough as possible. At least answer the three questions what, why and how. This will force you to think about the responsibilities, interface, cohesion and a lot of other things that probably saves you a lot of coding time and effort in the end.

The best thing about this approach is that you get right into the code without doing pre-planning, which most of the smaller hobby projects don’t have. You get the benefits of the planning with the pleasure of just diving into the code right away. It can never remove the need for proper planning for more important projects, but it will get your home project running smoother and better architected with little to no effort.

Coming from the Visual Basic world, I used to find many examples throughout the web written in VB and VB.NET. Then I got hired by Traceworks which was a VB.NET company, but they decided to move to C# because they couldn’t find employees that wanted to code VB.NET. So, I made the switch and haven’t looked back since. I haven’t written one line of VB.NET code for 2½ years.

In the beginning when I searched Google for some CLR specific stuff, it was very often that the code examples were in VB.NET. I had no problem translating them to C# so I didn’t care. As the time passed, more and more I saw that C# code was taking over the VB.NET examples throughout the web. Today, they do almost not exist unless you deliberately go to specific VB.NET sites like VB.NET Heaven.

Also, when you look at the job sections they are all about C#. It seems that VB has been replaced in the enterprises since companies are only looking for C# developers. There could be some differences from country to country – I haven’t checked them all…

If we are to believe that VB.NET is leaving the enterprises, where does it exist then? I keep seeing Channel 9 shows about the next releases of VB.NET and read some Microsoft blogs about it, but there really is no big hype in the blogosphere. No one writes about it on the web except for the Microsoft folk.

Do you know what became of VB.NET?